package com.yft.service.purchasepos;

import com.yft.dao.purchasepos.PosPurchaseOrderDetailDao;
import com.yft.entity.base.Order;
import com.yft.entity.base.Pager;
import com.yft.entity.purchasepos.PosPurchaseOrderDetail;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("posPurchaseOrderDetailService")
public class PosPurchaseOrderDetailServiceImp implements PosPurchaseOrderDetailService {
	Logger log = Logger.getLogger(PosPurchaseOrderDetailServiceImp.class);
	
	@Autowired(required = true)
	private PosPurchaseOrderDetailDao posPurchaseOrderDetailDao;

    @Override
    public Object addPosPurchaseOrderDetail(PosPurchaseOrderDetail posPurchaseOrderDetail) {
        return posPurchaseOrderDetailDao.addPosPurchaseOrderDetail(posPurchaseOrderDetail);
    }

    @Override
    public PosPurchaseOrderDetail getPosPurchaseOrderDetail(Integer posPurchaseOrderDetailPk) {
        return posPurchaseOrderDetailDao.getPosPurchaseOrderDetail(posPurchaseOrderDetailPk);
    }

    @Override
    public boolean updateValues(PosPurchaseOrderDetail condition, String cumstomStr) {
        return posPurchaseOrderDetailDao.updateValues(condition,cumstomStr);
    }

    @Override
    public List<PosPurchaseOrderDetail> getPosPurchaseOrderDetailList(PosPurchaseOrderDetail condition, Order order, Pager pager) {
        return posPurchaseOrderDetailDao.getPosPurchaseOrderDetailList(condition,order,pager);
    }

    @Override
    public boolean saveAllPosPurchaseOrderDetails(List<PosPurchaseOrderDetail> posPurchaseOrderDetails) {
        return posPurchaseOrderDetailDao.saveAllPosPurchaseOrderDetails(posPurchaseOrderDetails);
    }

    @Override
    public boolean delPosPurchaseOrderDetail(Object posPurchaseOrderDetail) {
        return posPurchaseOrderDetailDao.delPosPurchaseOrderDetail(posPurchaseOrderDetail);
    }
}
